import java.util.Arrays;

public class test {
    public static void main(String[] args) {
        int array[]={1,2,34,3,4,5,7,23,12};
        int i = 1;
        for( i = 1;i< array.length-2;i++){
            if(array[i-1] % 2 != 0 && array[i] % 2 != 0 && array[i+1] % 2 != 0){
                System.out.println("ture");
                break;
            }
        }
        if(i ==array.length-1){
            System.out.println(false);
        }
    }


    public static void main7(String[] args) {
        int array[]={1,1,3,3,3,3,3,2,2};
        for(int i = 0; i < array.length;i++){
            for(int j = i + 1;j < array.length;j++){
                if(array[i]>array[j]){
                    int ret = array[i];
                    array[i] = array[j];
                    array[j] = ret;
                }
            }
        }
        System.out.println(array[(array.length-1)/2]);
    }


    public static void main6(String[] args) {
        int array[]={1,2,2,3,3,4,5,4,5};
        for(int i = 0; i < array.length;i++){
            int sum = 0;
            for(int j = 0;j < array.length;j++){
                if(array[i] == array[j] && i != j){
                    sum++;
                }
            }
            if(sum == 0){
                System.out.println(array[i]);
            }
        }
    }


    public static void main5(String[] args) {
        int array[] ={2,7,11,15};
        int a = 9;
        for(int i = 0; i < array.length;i++){
            for(int j = i + 1;j < array.length;j++){
                if(array[i] + array[j] == a){
                    System.out.println(i + " "+ j);
                }
            }
        }
    }

    public static void main4(String[] args) {
        int array[] = {9,5,2,7};
        for(int i = 0; i < array.length;i++){
            for(int j = i + 1;j < array.length;j++){
                if(array[i]>array[j]){
                    int ret = array[i];
                    array[i] = array[j];
                    array[j] = ret;
                }
            }
        }
        System.out.println(Arrays.toString(array));
    }


    public static void main3(String[] args) {
        int array[] = {1,2,3,4,5,6,7,8,9,10};
        int left = 0;
        int right = array.length-1;
        int a = 3;//查找3
        while(left <= right){
            if(array[(left + right) / 2] == a){
                System.out.println(a);
                break;
            } else if (array[(left + right) / 2] < a) {
                left = (left + right)/2 + 1;
            }else{
                right = (left + right)/2 - 1;
            }
        }
        if(left > right){
            System.out.println("不在数组之中");
        }
    }

    public static void main2(String[] args) {
        int array[] ={1,2,3,4,5,6};
        int left = 0;
        int right = array.length-1;
        while (left<right){
            if((array[left] % 2 == 0) && (array[right] % 2 == 1)) {
                int ret = array[left];
                array[left] = array[right];
                array[right] = ret;
            }
            if(array[left] % 2 == 1){
                left++;
            }
            if(array[right] % 2 == 0){
                right--;
            }
        }
        System.out.println(Arrays.toString(array));
    }



public static void transform(int array[]) {
    for (int i = 0; i < array.length; i++) {
        array[i] *= 2;
    }
    System.out.println(Arrays.toString(array));
}

    public static void main1(String[] args) {
        int array[]={1 , 2 , 3};
        transform(array);
    }
}
